#!/usr/bin/env python
# Create: 2019/1/16
__author__ = '749B'

COURSE = "机器学习"
PRICE = 18  # RMB

p0 = {'url_info': [("宣传片", "https://media.wanmen.org/297d3a26-d6ea-42b8-a6ef-ff3b5a27e21d_pc_mid")]}

p1 = {'name': "第1讲 机器学习Machine Learning（一）", 'url_info': [
    ("1.1 机器学习与人工智能", "https://media.wanmen.org/41e584f0-69f6-4439-b49e-588d1f83c849_pc_mid"),
    ("1.2 人工智能领航者", "https://media.wanmen.org/3b7bc3ee-c785-410f-85d6-16b2d40e977e_pc_mid"),
    ("1.3 什么是机器学习", "https://media.wanmen.org/3deefb2d-737e-44ef-af13-92c92a65a1fd_pc_mid"),
    ("1.4 机器学习之统计回归", "https://media.wanmen.org/4332eea7-9a37-4ac5-bae4-d3b9e36e3416_pc_mid"),
]}

p2 = {'name': "第2讲 机器学习Machine Learning（二）", 'url_info': [
    ("2.1 课间答疑", "https://media.wanmen.org/cf79eb35-c687-47cb-ae10-50b20f4236d6_pc_mid"),
    ("2.2 机器学习之聚类", "https://media.wanmen.org/a0e01f30-143f-45dd-822b-f94abc2d3da5_pc_mid"),
    ("2.3 机器学习之大数据", "https://media.wanmen.org/29efe012-0738-410c-954c-a4072d47bb47_pc_mid"),
    ("2.4 机器学习之数据科学之路", "https://media.wanmen.org/1b78e6c4-ffe2-4db3-bdca-70b00ec2ab91_pc_mid"),
    # "https://api.wanmen.org/4.0/content/lectures/59c22d537b4af4676cf72556",
    ("2.5 数据科学家前景", "https://media.wanmen.org/1c3c13da-a6ba-4fee-a750-fb4b76038b36_pc_mid"),
    # "https://api.wanmen.org/4.0/content/lectures/59c22d5bb4421217cbf7248a",
    ("2.6 答疑", "https://media.wanmen.org/c5ee704a-3f8d-419f-a9a0-425af6d61103_pc_mid"),
]}

parts = [p0, p1, p2]
URLS = [(part.get('name'), item[0], item[1]) for part in parts for item in part.get('url_info')]

if __name__ == '__main__':
    from utils import check_url
    starts = 'https://media.wanmen.org/'
    ends = '_pc_mid'
    check_url.check([i[2] for i in URLS], starts, ends)
    print("视频数量:", len(URLS))






